// ~/pages/index.vue 第一排4个 card 数据源
export function getStatistics(){
  return new Promise((resolve, reject) => {
    const result = [
      { subTitle: '总支付订单', subUnit: '', subValue: 49, title: '支付订单', unit: '年', unitColor: 'success', value: 49 },
      { subTitle: '转化率', subUnit: '', subValue: 60, title: '订单量', unit: '周', unitColor: 'success', value: 555 },
      { subTitle: '总销售额', subUnit: '', subValue: 3.54, title: '销售额', unit: '年', unitColor: 'success', value: 3.54 },
      { subTitle: '总用户', subUnit: '', subValue: 17, title: '新增用户', unit: '年', unitColor: 'success', value: 17 },
    ]

    resolve(result)
  })
}

// ~/pages/index.vue 第三排图表数据源
export function getStatistics3(typeString){
  return new Promise((resolve, reject) => {
    const data = {
      x: ['07-24','07-23','07-22','07-21','07-20','07-19','07-18'],
      y: [51,32,1,1,11,2,1]
    }

    resolve(data)
  })
}

export function getStatistics301(){
  return new Promise((resolve, reject)=>{
    const data = {
      goods: [{label: '审核中', value: 1},{label: '销售中', value: 2},{label: '已下架', value: 11},{label: '库存预警', value: 3}],
      order: [{label: '待付款', value: 3},{label: '待发货', value: 14},{label: '已发货', value: 1},{label: '退款中', value: 17}]
    }

    resolve(data);
  })
}
